<template>
  <el-config-provider :locale="useAppStore().locale === 'zh-CN' ? zhCn : en">
    <router-view />
    <update-dialog v-model:visible="visible" />
    <basic-message-box />
  </el-config-provider>
</template>
<script setup lang="ts">
import en from 'element-plus/es/locale/lang/en'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

import {
  labelColorSymbol,
  labelWidthSymbol
} from './components/application/src/BasicLabelValue/types'

const visible = ref<boolean>(false)

provide(labelColorSymbol, '#454954')
provide(labelWidthSymbol, '104px')
onMounted(() => {
  window.onload = () => {
    document.body.addEventListener('plugin_web_update_notice', () => {
      visible.value = true
    })
  }
})
</script>
